using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class AnswerMap : EntityTypeConfiguration<Answer>
    {
        public AnswerMap()
        {
            // Primary Key
            this.HasKey(t => t.AR_ID);

            // Properties
            this.Property(t => t.LeftOrRight)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Answer");
            this.Property(t => t.AR_ID).HasColumnName("AR_ID");
            this.Property(t => t.EM_ID).HasColumnName("EM_ID");
            this.Property(t => t.LeftOrRight).HasColumnName("LeftOrRight");
            this.Property(t => t.AR_Count).HasColumnName("AR_Count");
            this.Property(t => t.Create_Time).HasColumnName("Create_Time");
            this.Property(t => t.State).HasColumnName("State");
        }
    }
}
